package com.aididi.util;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * @author ：xuzexiang
 * @description：
 * @date ： 2021/12/24 10:12
 */
public enum OrderStatusEnum {

    D1B("D1B","D0A"),
    D1A("D1A","D0A"),
    D1C("D1C","D0B"),
    D1D("D1D","D0B"),
    TNA("TNA","T0A"),
    TNB("TNB","T0A");

    @Getter
    @Setter
    private String type;

    @Getter
    @Setter
    private String typeVal;

    OrderStatusEnum(String type, String typeVal){
        this.type = type;
        this.typeVal =typeVal;
    }

    public static String of(String type) {
        for (OrderStatusEnum temp : OrderStatusEnum.values()) {
            if (temp.getType().equals(type)) {
                return temp.getTypeVal();
            }
        }
        return null;
    }



}
